import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

import Http from '../common/js/http.js'

const store = new Vuex.Store({
    state: {
        tabBarList: '',
        siteState: 1,
        themeStyle: '',
        addonIsExist: {
            bundling: 0,
            coupon: 0,
            discount: 0,
            fenxiao: 0,
            gift: 0,
            groupbuy: 0,
            manjian: 0,
            memberconsume: 0,
            memberrecharge: 0,
            memberregister: 0,
            membersignin: 0,
            memberwithdraw: 0,
            memberrecommend: 0,
            pintuan: 0,
            pointexchange: 0,
            seckill: 0,
            store: 0,
            topic: 0,
            bargain: 0,
            membercancel: 0,
            servicer: 0,
            supermember: 0,
            giftcard: 0,
            divideticket: 0,
            scenefestival: 0,
            birthdaygift: 0,
            pinfan: 0
        },
        sourceMember: 0, // 来源会员
        authInfo: {}, // 授权信息
        token: null,
        flRefresh: 0,
        location: null, // 定位信息
        defaultImg: {
            goods: '',
            head: '',
            store: '',
            article: ''
        },
        cartNumber: 0,
        cartList: {},
        cartMoney: 0,
        siteInfo: null,
        cartChange: 0,
        bottomNavHidden: false, // 底部导航是否隐藏，true：隐藏，false：显示
        globalStoreConfig: null, // 门店配置
        globalStoreInfo: null, // 门店信息
        componentsLoad: {
            Search: false,
            ImageAds: false,
            RubikCube: false
        },
        cartPosition: null, // 购物车所在位置
        componentRefresh: 0, // 组件刷新
        servicerConfig: null, // 客服配置
        diySeckillInterval: null,
        diyGroupPositionObj: {},
        diyGroupShowModule: '',
        tabBarHeight: '0px'
    }
})
export default store